<#-- 这里提供一些项目中可复用的数据渲染组件 可能是多个UI组件的复合体 -->
<#import "../common/constant.ftl" as constant>
<#import "../common/utils.ftl" as utils>
<#import "../components/tag.ftl" as tag>
<#assign contextPath=constant.contextPath/>
<#assign webName=constant.webName/>

<#--
    header渲染器
    head={
        title:""
        css:[],
        js:[],
        pageFlag:""
    }
-->
<#macro headerRender head={}>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
    <meta neme="pagecontextpath" content="${contextPath}"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="shortcut icon" href="${contextPath}/favicon.ico" />
    <meta name="keywords" content="广州爱点公共关系服务有限公司,公关,广告" />
    <meta name="description" content="【广州爱点公共关系服务有限公司】凭借多年的公关活动服务经验，致力于提供最契合客户需求的项目解决方案。主要业务涵盖活动策划、会务论坛、礼仪庆典、地产营销、平面设计、影视制作、演艺经纪等板块，为每一位客户提供个性化公关活动定制服务。">
    <title>${(head.title)!"首页"}-${webName},广告、公关，我们特专业！</title>

    <link rel="stylesheet" href="${contextPath}/static/css/common.css" >
    <link rel="stylesheet" href="${contextPath}/static/css/tools/skitter/skitter.styles.css" >
    <link rel="stylesheet" href="${contextPath}/static/css/idea.css" >

    <#list head.css as css>
        <link rel="stylesheet" href="${contextPath}/static/css/${css}.css" >
    </#list>

    <script src="${contextPath}/static/js/tools/console.js" type="text/javascript"></script>
    <script src="${contextPath}/static/js/tools/jquery.tools.min.js" type="text/javascript"></script>
    <script src="${contextPath}/static/js/tools/jquery.easing.1.3.js" type="text/javascript"></script>
    <script src="${contextPath}/static/js/tools/jquery.skitter.min.js" type="text/javascript"></script>
    <script src="${contextPath}/static/js/tools/jquery.plugIn.lazyload.js" type="text/javascript"></script>
    <!--[if IE 6]>
    <script src="${contextPath}/static/js/tools/jquery.plugIn.DD_belatedPNG_0.0.8a.js" type="text/javascript"></script>
    <![endif]-->
    <script src="${contextPath}/static/js/tools/jquery.plugIn.js" type="text/javascript"></script>
    <script src="${contextPath}/static/js/idea.js" type="text/javascript"></script>
    <#list head.js as js>
        <script src="${contextPath}/static/js/${js}.js" type="text/javascript"></script>
    </#list>
</head>
<body class="fa ft fv fs fw">
<div id="J_nav" class="header">
    <div class="content">
        <div class="item_logo"><img src="${contextPath}/static/images/resource/logo.png" alt="${webName}"/></div>
        <@navRender head.pageFlag/>
    </div>
</div>
<div id="main" class="page_content">
</#macro>

<#--
    footer 渲染器
-->
<#macro footerRender>
</div>
<div id="footer" class="footer">
    <div class="content">
        <p>Copyright © 2013&nbsp;&nbsp;广州爱点公共关系服务有限公司&nbsp;&nbsp;All Rights Reserved.</p>
        <p>
            联系人：
            <b>苏先生&nbsp;13480202064</b>&nbsp;<b>QQ:</b><@macro.component.componentUtils.loadQQ "280709818"/>
            <b>杨小姐&nbsp;13570907694</b>&nbsp;<b>QQ:</b><@macro.component.componentUtils.loadQQ "734300774"/>
        </p>
        <p>
            地址：广州市海珠区海联路6-8号银珠商务中心二楼B30室&nbsp;&nbsp;
            &nbsp;&nbsp;传真：020-34283696
        </p>
    </div>
</div>
</body>
</html>
</#macro>

<#--
	页面渲染器
	head={
        title:""
        css:[],
        js:[],
        pageFlag:""
    }
-->
<#macro pageRender head>
    <#local head={"title":"","css":[],"js":[]}+head>

    <#-- 头部文件 BEGIN -->
    <@headerRender head=head/>
    <#-- 头部文件 END -->

    <#-- 主体部分BEGIN -->
        <#nested>
    <#-- 主体部分END -->

    <#-- 版权部分BEGIN  -->
    <@tag.blank/>
    <@footerRender/>
    <#-- 版权部分END  -->
</#macro>

<#macro navRender pageFlag="index">
    <#local navs=[
        {"url":"${contextPath}/index.htm","flag":"index","label":"首页"},
        {"url":"#","flag":"aboutUs","label":"公司简介"},
        {"url":"${contextPath}/services.htm","flag":"services","label":"服务项目"},
        {"url":"${contextPath}/case.htm","flag":"case","label":"成功案例"},
        {"url":"#","flag":"contact","label":"联系我们"}
    ]/>

    <#list navs as nav>
        <#local selectedNavClass=""/>
        <#if nav.flag==pageFlag>
            <#local selectedNavClass="selected"/>
        </#if>
        <a class="repeatXBg item ${selectedNavClass}" href="${nav.url}">${nav.label}</a>
    </#list>
</#macro>

<#--
	异常页面渲染器
	title:页面标题
	tips:提示信息
-->
<#macro errrorPageRender title="" tips="">
	<#local componentcssArray = ["exception"]>
	<#local head={"title":title,"componentcssArray":componentcssArray}>
	<@pageRender head=head>
		<div class="exception">
			<div class="xfull"><@componentUtils.imgRender url="error.jpg" alt="访问出错啦" attr='class="errorImg"'/></div>
			<div class="errorTips f20 b">${tips}</div>
			<div class="xfull"><a href="/index.htm" class="link b f14">返回首页</a></div>
		</div>
	</@pageRender>
</#macro>